﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using MODEL;
using DAL;

namespace Service
{
    public class StationService : IStationServcie
    {
        public async Task<IEnumerable<StationInfo>> QueryStationsAsync(StationQueryCriteria criteria = null)
        {
            return await StationDAL.QueryStationsAsync(criteria);
        }

        public async Task<StationData> GetStationCountDataByIdAsync(string countDataId)
        {
            return await StationDAL.GetStationCountDataByIdAsync(countDataId);
        }

        public async Task<StationData> GetStationRealDataByIdAsync(string realDataId)
        {
            return await StationDAL.GetStationRealDataByIdAsync(realDataId);
        }

        public async Task<int> DeleteStations(List<int> stationIdList)
        {
            return await StationDAL.DeleteStations(stationIdList);
        }

        public async Task<int> UpdateStationElementListAsync(int stationId, List<string> elementCodes)
        {
            return await StationDAL.UpdateStationElementListAsync(stationId, elementCodes);
        }

        public async Task<int> InsertOrUpdateStationAsync(StationInfo stationInfo)
        {
            return await StationDAL.InsertOrUpdateStationAsync(stationInfo);
        }

        public async Task<int> MapUserWithStationAsync(string userId, List<StationInfo> stationInfos)
        {
            return await StationDAL.MapUserWithStationAsync(userId, stationInfos);
        }
    }
}
